Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Behaviour of use-toast.ts #1038

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

julienvanbeveren
Copy link

@julienvanbeveren julienvanbeveren commented Jul 26, 2023

I added the option to provide your own id when creating a toast, so if an effect runs twice or you instantiate the same toast twice it only gets added once. (dedupe of toasts -> same behaviour as react-hot-toast)

I also removed the required id param when updating a toast (the toast hook is already aware of the id of the toast you try to update)

here is the issue linked with this PR: #1039

- optional custom id to prevent duplicate toasts
@vercel
Copy link

vercel bot commented Jul 30, 2023

@shadcn is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants